package com.haidechizi.designpattern.proxy.dynamic.javasis;

import com.haidechizi.designpattern.proxy.dynamic.Student;
import com.haidechizi.designpattern.proxy.dynamic.StudentServiceImpl;

/**
 * @author haidechizi
 */
public class JavassistProxyMain {

    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        StudentServiceImpl studentService = JavassistProxyFactory.getProxy(StudentServiceImpl.class);
        Student student = new Student(1L, "Jack", 18);
        studentService.save(student);
    }
}
